package com.metal.silver.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.metal.silver.mapper.CustomerVisitMapper;
import com.metal.silver.domain.CustomerVisit;
import com.metal.silver.service.ICustomerVisitService;
import com.ruoyi.common.core.text.Convert;

/**
 * 客户拜访单Service业务层处理
 * 
 * @author Kelvin
 * @date 2022-10-20
 */
@Service
public class CustomerVisitServiceImpl implements ICustomerVisitService 
{
    @Autowired
    private CustomerVisitMapper customerVisitMapper;

    /**
     * 查询客户拜访单
     * 
     * @param uuid 客户拜访单主键
     * @return 客户拜访单
     */
    @Override
    public CustomerVisit selectCustomerVisitByUuid(String uuid)
    {
        return customerVisitMapper.selectCustomerVisitByUuid(uuid);
    }

    /**
     * 查询客户拜访单列表
     * 
     * @param customerVisit 客户拜访单
     * @return 客户拜访单
     */
    @Override
    public List<CustomerVisit> selectCustomerVisitList(CustomerVisit customerVisit)
    {
        return customerVisitMapper.selectCustomerVisitList(customerVisit);
    }

    /**
     * 新增客户拜访单
     * 
     * @param customerVisit 客户拜访单
     * @return 结果
     */
    @Override
    public int insertCustomerVisit(CustomerVisit customerVisit)
    {
        return customerVisitMapper.insertCustomerVisit(customerVisit);
    }

    /**
     * 修改客户拜访单
     * 
     * @param customerVisit 客户拜访单
     * @return 结果
     */
    @Override
    public int updateCustomerVisit(CustomerVisit customerVisit)
    {
        return customerVisitMapper.updateCustomerVisit(customerVisit);
    }

    /**
     * 批量删除客户拜访单
     * 
     * @param uuids 需要删除的客户拜访单主键
     * @return 结果
     */
    @Override
    public int deleteCustomerVisitByUuids(String uuids)
    {
        return customerVisitMapper.deleteCustomerVisitByUuids(Convert.toStrArray(uuids));
    }

    /**
     * 删除客户拜访单信息
     * 
     * @param uuid 客户拜访单主键
     * @return 结果
     */
    @Override
    public int deleteCustomerVisitByUuid(String uuid)
    {
        return customerVisitMapper.deleteCustomerVisitByUuid(uuid);
    }
}
